/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import MouseSensorDriver.Calibrator;
import adc_lcard.ADCE140Driver;
import dynamixel.EndoscopeGear;

/**
 *
 * @author Asko
 */
public class ShelfEndoChannel {

    int adcNum = 0;
    EndoscopeGear gear;
    int calibChannelPos = 0;
    int calibChannelTorque = 0;

    public ShelfEndoChannel(EndoscopeGear gear, int adcNum,
            int calibChannelPos, int calibChannelTorque) {
        this.gear = gear;
        this.adcNum = adcNum;
        this.calibChannelPos = calibChannelPos;
        this.calibChannelTorque = calibChannelTorque;
    }

    public EndoscopeGear getGear() {
        return gear;
    }

    public double getAdcData() {
        return Calibrator.get().getData(calibChannelPos, ADCE140Driver.getGdata(adcNum));
    }

    public double getAdcData(int val) {
        return Calibrator.get().getData(calibChannelPos, val);
    }

    public int getAdcSourceData() {
        return ADCE140Driver.getGdata(adcNum);
    }

    public double getTorqueData() {
        return Calibrator.get().getData(calibChannelTorque, ADCE140Driver.getGdata(adcNum));
    }

    public double getTorqueData(int val) {
        return Calibrator.get().getData(calibChannelTorque, val);
    }

    public int getTorqueSourceData() {
        return ADCE140Driver.getGdata(adcNum);
    }
}
